<!DOCTYPE html>
<html>
<#include "../head.html">
    <body class="full">
    <div class="mc">
        <div class="mc-l">
            <!--左侧导航---{-->
            <div id="navPanelContainer">
                <div class="system-logo cd"></div>
                <!--管理员信息---{-->
                <#include "../adminInfo.html">
                    <!--管理员信息---}-->
                    <div class="nav-wrap">
                        <#include "left.html">
                    </div>
            </div>
            <!--左侧导航---}-->
        </div>
        <div class="mc-m">
            <div class="navToggle"></div>
        </div>
        <div class="mc-r">
            <!--顶部导航---{-->
            <#include "../topNav.html">
                <!--顶部导航---}-->

                <!--面包屑导航---{-->
                <#assign moduleName="栏目管理">
                    <#include "banner.html">
                        <!--面包屑导航---}-->
                        <div id="toolbar" class="clearfix">
                            <div class="toolbor-module">
                                <!--    <a class="input-button" href="addSite.html" style="line-height:24px;">添加一级目</a>-->
                                <a class="input-button" href="addSite.html?<#if site??>pid=${site.pid!0}</#if>">添加栏目</a>
                                <a class="input-button" href="delSite.html?<#if site??>siteId=${site.siteId!0}</#if>">删除栏目</a>

                            </div>
                        </div>

                        <#if site?exists>


                            <div id="main" class="w750 clearfix">

                                <form action="modifySite.html" method="post" name="form1" enctype="multipart/form-data">
                                    <div class="valBox">
                                        <div class="top">
                                            <strong>编辑栏目</strong>
                                        </div>
                                        <div class="clearfix">
                                            <ul class="title-v edit">
                                                <li>
                                                    <div class="title">所在栏目：</div>
                                                    <div class="v">
                                                        <strong><#if psite??> ${psite.name!}</#if><input type="hidden" name="pid" value="${site.pid}" /></strong>
                                                    </div>
                                                </li>
                                                <li>
                                                    <div class="title">栏目名称：</div>
                                                    <div class="v">
                                                        <input type="text" align="absmiddle" name="name" value="${site.name!}" />
                                                        <label><input type="checkbox" name="isurl" value="${site.isurl!0}" onclick="jump_url()" <#if site.isurl??&&site.isurl=="0">checked="checked" </#if> />跳转页</label>
                                                    </div>
                                                </li>
                                                <li>
                                                    <div class="title">栏目编码：</div>
                                                    <div class="v"><input name="code" type="text" value="${site.code!''}" />
                                                    </div>
                                                </li>
                                                <li style="display:none" id="jump_url">
                                                    <div class="title">跳转网址：</div>
                                                    <div class="v">
                                                        <input type="text" name="url"  class="input_border" value="${site.url!}" size="30" />
                                                    </div>
                                                </li>
                                                <li>
                                                    <div class="title">识别ID(nid)：</div>
                                                    <div class="v">
                                                        <input type="text" align="absmiddle" name="nid"  onkeyup="value=value.replace(/[^a-zA-Z_0-9]/g,'')" value="${site.nid!}"/> 只能为数字、字母和下划线（_）
                                                    </div>
                                                </li>
                                                <li>
                                                    <div class="title">状&nbsp;&nbsp;&nbsp; 态：</div>
                                                    <div class="v">
                                                        <label><input type="radio" value="0" name="status" <#if site.status??&&site.status==0>checked="checked" </#if>  />隐藏</label>
                                                        <label><input type="radio" value="1" name="status" <#if site.status??&&site.status==1>checked="checked" </#if> />显示</label>
                                                    </div>
                                                </li>
                                                <li>
                                                    <div class="title">栏目类型：</div>
                                                    <div class="v">
                                                        <label><input type="radio" value="0" name="style" <#if site.style??&&site.style=="0">checked="checked" </#if> />列表</label>
                                                        <label><input type="radio" value="1" name="style" <#if site.style??&&site.style=="1">checked="checked" </#if> />单页文章</label>
                                                    </div>
                                                </li>
                                                <li>
                                                    <div class="title">排列顺序：</div>
                                                    <div class="v">
                                                        <input type="text" align="absmiddle" name="sort"  onkeyup="value=value.replace(/[^0-9]/g,'')" size="5" value="${site.sort!}"/>
                                                    </div>
                                                </li>
                                                <li>
                                                    <div class="title">栏目描述：</div>
                                                    <div class="v">
                                                        <textarea name="description" cols="38" rows="3" id="textarea2">${site.description!}</textarea>
                                                    </div>
                                                </li>
                                                <script charset="utf-8" src="${webroot}/plugins/editor/kindeditor/kindeditor-min.js"></script>
                                                <script charset="utf-8" src="${webroot}/plugins/editor/kindeditor/lang/zh_CN.js"></script>
                                                <script>
                                                    /*KindEditor.ready(function(K) {
                                                        editor = K.create('textarea[name="content"]', {
                                                            uploadJson : '${webroot}/editorUploadImg.html',
                                                            fileManagerJson : '${webroot}/editorUploadImg.html',
                                                            allowFileManager : true,
                                                            items:['source', '|', 'fullscreen', 'undo', 'redo', 'print', 'cut', 'copy', 'paste',
                                                                   'plainpaste', 'wordpaste', '|', 'justifyleft', 'justifycenter', 'justifyright',
                                                                   'justifyfull', 'insertorderedlist', 'insertunorderedlist', 'indent', 'outdent', 'subscript',
                                                                   'superscript', '|', 'selectall', '-',
                                                                   'title', 'fontname', 'fontsize', '|', 'textcolor', 'bgcolor', 'bold',
                                                                   'italic', 'underline', 'strikethrough', 'removeformat', '|',
                                                                   'image','advtable', 'hr', 'emoticons', 'link', 'unlink']
                                                        });
                                                    });*/
                                                </script>

                                                <li>
                                                    <div class="title">栏目内容：</div>
                                                    <div class="v">
                                                        <!-- <textarea name="content" id="content" style="width:600px;height:200px;visibility:hidden;" class="ckeditor"><br>${site.content!}</textarea> -->
                                                        <#include "../../common/ueditor.html">
                                                            <#if site.content??>
                                                                <@showUeditor width=680 heigth=100 id="content" name="content" content="${site.content}" />
                                                                <#else>
                                                                    <@showUeditor width=680 heigth=100 id="content" name="content" content=" " />
                                                            </#if>

                                                    </div>
                                                </li>
                                                <li>
                                                    <div class="title">上传文件：</div>
                                                    <div class="v">
                                                        <input type='file' name='files' value='' size='20' id='files'>
                                                    </div>
                                                </li>

                                            </ul>
                                        </div>
                                    </div>
                                    <div id="bottomToolbar" class="clearfix">
                                        <input type="hidden" value="${site.siteId!0}"  name="siteId" />
                                        <input type="hidden" name="fid" value="${site.franchisee.id}">
                                        <input type="submit" class="input-button post" name="submit_ok" value="提交">
                                        <input type="reset" name="reset" class="input-button reset" value="重置">
                                    </div>
                                </form>
                        </#if>
        </div>
        </div>
    </div>
    <div class="mc-b">
        <#include "../foot.html">
    </div>
    <#include "../../jsPage.html">
    </body>
</html>
